import { Directive, ElementRef, OnInit } from '@angular/core';

@Directive({ selector: '[opRequiredLabel]' })
export class RequiredLabelDirective implements OnInit {
    constructor(private element: ElementRef) { }

    ngOnInit(): void {
        this.element.nativeElement.innerHTML = '<span class="required"><i class="fa fa-asterisk"></i> </span> ' + this.element.nativeElement.innerText;
    }
}